/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.trino.grammar.sql;

import com.google.common.collect.ImmutableSet;
import org.junit.jupiter.api.Test;

import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static org.assertj.core.api.Assertions.assertThat;

public class TestSqlKeywords
{
    @Test
    public void test()
    {
        assertThat(SqlKeywords.sqlKeywords().stream().sorted().collect(toImmutableSet()))
                .isEqualTo(ImmutableSet.of(
                        "ABSENT",
                        "ADD",
                        "ADMIN",
                        "AFTER",
                        "ALL",
                        "ALTER",
                        "ANALYZE",
                        "AND",
                        "ANY",
                        "ARRAY",
                        "AS",
                        "ASC",
                        "AT",
                        "AUTHORIZATION",
                        "BEGIN",
                        "BERNOULLI",
                        "BETWEEN",
                        "BOTH",
                        "BY",
                        "CALL",
                        "CALLED",
                        "CASCADE",
                        "CASE",
                        "CAST",
                        "CATALOG",
                        "CATALOGS",
                        "COLUMN",
                        "COLUMNS",
                        "COMMENT",
                        "COMMIT",
                        "COMMITTED",
                        "CONDITIONAL",
                        "CONSTRAINT",
                        "COPARTITION",
                        "COUNT",
                        "CREATE",
                        "CROSS",
                        "CUBE",
                        "CURRENT",
                        "CURRENT_CATALOG",
                        "CURRENT_DATE",
                        "CURRENT_PATH",
                        "CURRENT_ROLE",
                        "CURRENT_SCHEMA",
                        "CURRENT_TIME",
                        "CURRENT_TIMESTAMP",
                        "CURRENT_USER",
                        "DATA",
                        "DATE",
                        "DAY",
                        "DEALLOCATE",
                        "DECLARE",
                        "DEFAULT",
                        "DEFINE",
                        "DEFINER",
                        "DELETE",
                        "DENY",
                        "DESC",
                        "DESCRIBE",
                        "DESCRIPTOR",
                        "DETERMINISTIC",
                        "DISTINCT",
                        "DISTRIBUTED",
                        "DO",
                        "DOUBLE",
                        "DROP",
                        "ELSE",
                        "ELSEIF",
                        "EMPTY",
                        "ENCODING",
                        "END",
                        "ERROR",
                        "ESCAPE",
                        "EXCEPT",
                        "EXCLUDING",
                        "EXECUTE",
                        "EXISTS",
                        "EXPLAIN",
                        "EXTRACT",
                        "FALSE",
                        "FETCH",
                        "FILTER",
                        "FINAL",
                        "FIRST",
                        "FOLLOWING",
                        "FOR",
                        "FORMAT",
                        "FROM",
                        "FULL",
                        "FUNCTION",
                        "FUNCTIONS",
                        "GRACE",
                        "GRANT",
                        "GRANTED",
                        "GRANTS",
                        "GRAPHVIZ",
                        "GROUP",
                        "GROUPING",
                        "GROUPS",
                        "HAVING",
                        "HOUR",
                        "IF",
                        "IGNORE",
                        "IMMEDIATE",
                        "IN",
                        "INCLUDING",
                        "INITIAL",
                        "INNER",
                        "INPUT",
                        "INSERT",
                        "INTERSECT",
                        "INTERVAL",
                        "INTO",
                        "INVOKER",
                        "IO",
                        "IS",
                        "ISOLATION",
                        "ITERATE",
                        "JOIN",
                        "JSON",
                        "JSON_ARRAY",
                        "JSON_EXISTS",
                        "JSON_OBJECT",
                        "JSON_QUERY",
                        "JSON_TABLE",
                        "JSON_VALUE",
                        "KEEP",
                        "KEY",
                        "KEYS",
                        "LANGUAGE",
                        "LAST",
                        "LATERAL",
                        "LEADING",
                        "LEAVE",
                        "LEFT",
                        "LEVEL",
                        "LIKE",
                        "LIMIT",
                        "LISTAGG",
                        "LOCAL",
                        "LOCALTIME",
                        "LOCALTIMESTAMP",
                        "LOGICAL",
                        "LOOP",
                        "MAP",
                        "MATCH",
                        "MATCHED",
                        "MATCHES",
                        "MATCH_RECOGNIZE",
                        "MATERIALIZED",
                        "MEASURES",
                        "MERGE",
                        "MINUTE",
                        "MONTH",
                        "NATURAL",
                        "NESTED",
                        "NEXT",
                        "NFC",
                        "NFD",
                        "NFKC",
                        "NFKD",
                        "NO",
                        "NONE",
                        "NORMALIZE",
                        "NOT",
                        "NULL",
                        "NULLIF",
                        "NULLS",
                        "OBJECT",
                        "OF",
                        "OFFSET",
                        "OMIT",
                        "ON",
                        "ONE",
                        "ONLY",
                        "OPTION",
                        "OR",
                        "ORDER",
                        "ORDINALITY",
                        "OUTER",
                        "OUTPUT",
                        "OVER",
                        "OVERFLOW",
                        "PARTITION",
                        "PARTITIONS",
                        "PASSING",
                        "PAST",
                        "PATH",
                        "PATTERN",
                        "PER",
                        "PERIOD",
                        "PERMUTE",
                        "PLAN",
                        "POSITION",
                        "PRECEDING",
                        "PRECISION",
                        "PREPARE",
                        "PRIVILEGES",
                        "PROPERTIES",
                        "PRUNE",
                        "QUOTES",
                        "RANGE",
                        "READ",
                        "RECURSIVE",
                        "REFRESH",
                        "RENAME",
                        "REPEAT",
                        "REPEATABLE",
                        "REPLACE",
                        "RESET",
                        "RESPECT",
                        "RESTRICT",
                        "RETURN",
                        "RETURNING",
                        "RETURNS",
                        "REVOKE",
                        "RIGHT",
                        "ROLE",
                        "ROLES",
                        "ROLLBACK",
                        "ROLLUP",
                        "ROW",
                        "ROWS",
                        "RUNNING",
                        "SCALAR",
                        "SCHEMA",
                        "SCHEMAS",
                        "SECOND",
                        "SECURITY",
                        "SEEK",
                        "SELECT",
                        "SERIALIZABLE",
                        "SESSION",
                        "SET",
                        "SETS",
                        "SHOW",
                        "SKIP",
                        "SOME",
                        "START",
                        "STATS",
                        "STRING",
                        "SUBSET",
                        "SUBSTRING",
                        "SYSTEM",
                        "TABLE",
                        "TABLES",
                        "TABLESAMPLE",
                        "TEXT",
                        "THEN",
                        "TIES",
                        "TIME",
                        "TIMESTAMP",
                        "TO",
                        "TRAILING",
                        "TRANSACTION",
                        "TRIM",
                        "TRUE",
                        "TRUNCATE",
                        "TRY_CAST",
                        "TYPE",
                        "UESCAPE",
                        "UNBOUNDED",
                        "UNCOMMITTED",
                        "UNCONDITIONAL",
                        "UNION",
                        "UNIQUE",
                        "UNKNOWN",
                        "UNMATCHED",
                        "UNNEST",
                        "UNTIL",
                        "UPDATE",
                        "USE",
                        "USER",
                        "USING",
                        "VALIDATE",
                        "VALUE",
                        "VALUES",
                        "VERBOSE",
                        "VERSION",
                        "VIEW",
                        "WHEN",
                        "WHERE",
                        "WHILE",
                        "WINDOW",
                        "WITH",
                        "WITHIN",
                        "WITHOUT",
                        "WORK",
                        "WRAPPER",
                        "WRITE",
                        "YEAR",
                        "ZONE"));
    }
}
